

package com.uit.ecommerce.bo;

import com.uit.ecommerce.access.mapper.AreaMapper;
import com.uit.ecommerce.dto.AreaDTO;
import java.util.ArrayList;

public class AreaBO {
public ArrayList<AreaDTO> getAllArea() throws Exception{
    AreaMapper AM=new AreaMapper();
    return AM.GetAllArea();
}
public AreaDTO getAreaByID(String ID) throws Exception{
     AreaMapper AM=new AreaMapper();
     return AM.GetAreaById(ID);
}
public AreaDTO getAreaByName(String Name) throws Exception{
     AreaMapper AM=new AreaMapper();
     return AM.GetAreaByName(Name);
}
public boolean CheckIdExit(String ID) throws Exception{
    AreaMapper AM=new AreaMapper();
     return AM.IsIdExisted(ID);
}
public ArrayList<AreaDTO> getAllAreaByCoutryCode(String ContryCode) throws Exception{
    AreaMapper AM=new AreaMapper();
    return AM.GetAreaByCountryCode(ContryCode);
}
public ArrayList<AreaDTO> getAllAreaByCoutryName(String Contry) throws Exception{
    AreaMapper AM=new AreaMapper();
    return AM.GetAreaByCountryName(Contry);
}
public void InsertArea(AreaDTO cls) throws Exception{
    AreaMapper AM=new AreaMapper();
    AM.InsertArea(cls);
}
public void DeleteArea(String Id) throws Exception{
    AreaMapper AM=new AreaMapper();
    AM.DeleteArea(Id);
}

}
